<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改表级映射信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-table-edit" th:object="${mappingTableInfo}">
            <input name="tableId" th:field="*{tableId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">文档id：</label>
                <div class="col-sm-8">
                    <input name="excelId" th:field="*{excelId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">文档名称：</label>
                <div class="col-sm-8">
                    <textarea name="excelFilename" class="form-control" required>[[*{excelFilename}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">目标表id：</label>
                <div class="col-sm-8">
                    <input name="targetTableId" th:field="*{targetTableId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">目标表code：</label>
                <div class="col-sm-8">
                    <input name="targetTableCode" th:field="*{targetTableCode}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">目标表名称：</label>
                <div class="col-sm-8">
                    <input name="targetTableName" th:field="*{targetTableName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">源表id：</label>
                <div class="col-sm-8">
                    <input name="sourceTableId" th:field="*{sourceTableId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">源表code：</label>
                <div class="col-sm-8">
                    <input name="sourceTableCode" th:field="*{sourceTableCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">源表名称：</label>
                <div class="col-sm-8">
                    <input name="sourceTableName" th:field="*{sourceTableName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">取源数据sql：</label>
                <div class="col-sm-8">
                    <textarea name="sourceSql" class="form-control">[[*{sourceSql}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">业务场景描述：</label>
                <div class="col-sm-8">
                    <textarea name="bizScenario" class="form-control">[[*{bizScenario}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">表主从分类：</label>
                <div class="col-sm-8">
                    <select name="mainSubType" class="form-control m-b">
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">表主从关系：</label>
                <div class="col-sm-8">
                    <textarea name="mainSubDetail" class="form-control">[[*{mainSubDetail}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">处理状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" name="parseStatus" value="" required>
                        <label th:for="parseStatus" th:text="未知"></label>
                    </div>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">错误信息：</label>
                <div class="col-sm-8">
                    <textarea name="errorMsg" class="form-control">[[*{errorMsg}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "mapping/table";
        $("#form-table-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-table-edit').serialize());
            }
        }
    </script>
</body>
</html>